/** <b>meteoBeanInfo.java</b> - Klasa BeanInfo - Meteo 1.0
 * Created on 2010-03-23, 5:15:08 */

import java.beans.*;

/** @author MACIEJ KOPLIN - 70482 TIiM, Wydział Elektroniki i Inforamtyki, Politechnika Koszalińska
* III rok, sem VI. Rok akademicki 2009/2010.
* @version Meteo 1.0*/

/** <b>meteo.java</b> - Klasa odczytywanieBeanInfo dzieczy po SimpleBean Info - Meteo 1.0 */
public class meteoBeanInfo extends SimpleBeanInfo {

    // Bean descriptor//GEN-FIRST:BeanDescriptor
    /*lazy BeanDescriptor*/
    private static BeanDescriptor getBdescriptor(){
        BeanDescriptor beanDescriptor = new BeanDescriptor  ( meteo.class , null ); // NOI18N
        beanDescriptor.setDisplayName ( "Meteo" );
        beanDescriptor.setShortDescription ( "Meteo" );//GEN-HEADEREND:BeanDescriptor

    // Here you can add code for customizing the BeanDescriptor.

        return beanDescriptor;     }//GEN-LAST:BeanDescriptor
    String iconColor16x16Filename="meteo16.gif";
    String iconColor32x32Filename="meteo32.gif";

    /** Metoda ustawia ikonę Ziarna w zależności od wersji
    * @param iconKind
    * @return zwaraca ikonę */
    public java.awt.Image getIcon(int iconKind) {
    switch (iconKind) {
          case BeanInfo.ICON_COLOR_16x16:
                return iconColor16x16Filename != null ? loadImage(iconColor16x16Filename) : null;
          case BeanInfo.ICON_COLOR_32x32:
                return iconColor32x32Filename != null ? loadImage(iconColor32x32Filename) : null;
          case BeanInfo.ICON_MONO_16x16:
                return iconColor16x16Filename != null ? loadImage(iconColor16x16Filename) : null;
          case BeanInfo.ICON_MONO_32x32:
                return iconColor32x32Filename != null ? loadImage(iconColor32x32Filename) : null;
         }
    return null;
    }

    // Property identifiers//GEN-FIRST:Properties
    private static final int PROPERTY_cisn = 0;
    private static final int PROPERTY_dzialaj = 1;
    private static final int PROPERTY_komunikat = 2;
    private static final int PROPERTY_pogoda = 3;
    private static final int PROPERTY_port = 4;
    private static final int PROPERTY_prognoza = 5;
    private static final int PROPERTY_temp = 6;
    private static final int PROPERTY_wilg = 7;

    // Property array 
    /*lazy PropertyDescriptor*/
    private static PropertyDescriptor[] getPdescriptor(){
        PropertyDescriptor[] properties = new PropertyDescriptor[8];
    
        try {
            properties[PROPERTY_cisn] = new PropertyDescriptor ( "cisn", meteo.class, "getCisn", "setCisn" ); // NOI18N
            properties[PROPERTY_cisn].setDisplayName ( "Cisnienie" );
            properties[PROPERTY_cisn].setShortDescription ( "Cisnienie" );
            properties[PROPERTY_dzialaj] = new PropertyDescriptor ( "dzialaj", meteo.class, null, "setDzialaj" ); // NOI18N
            properties[PROPERTY_dzialaj].setDisplayName ( "Oblicz" );
            properties[PROPERTY_dzialaj].setShortDescription ( "Oblicz" );
            properties[PROPERTY_komunikat] = new PropertyDescriptor ( "komunikat", meteo.class, "getKomunikat", null ); // NOI18N
            properties[PROPERTY_komunikat].setDisplayName ( "Komunikat z urzadzenia" );
            properties[PROPERTY_komunikat].setShortDescription ( "Komunikat z urzadzenia" );
            properties[PROPERTY_pogoda] = new PropertyDescriptor ( "pogoda", meteo.class, "getPogoda", null ); // NOI18N
            properties[PROPERTY_pogoda].setDisplayName ( "Pogoda" );
            properties[PROPERTY_pogoda].setShortDescription ( "Pogoda" );
            properties[PROPERTY_port] = new PropertyDescriptor ( "port", meteo.class, "getPort", null ); // NOI18N
            properties[PROPERTY_port].setDisplayName ( "Port COM" );
            properties[PROPERTY_port].setShortDescription ( "Port COM" );
            properties[PROPERTY_prognoza] = new PropertyDescriptor ( "prognoza", meteo.class, "getPrognoza", null ); // NOI18N
            properties[PROPERTY_prognoza].setDisplayName ( "Prognoza" );
            properties[PROPERTY_prognoza].setShortDescription ( "Prognoza" );
            properties[PROPERTY_temp] = new PropertyDescriptor ( "temp", meteo.class, "getTemp", "setTemp" ); // NOI18N
            properties[PROPERTY_temp].setDisplayName ( "Temperatura" );
            properties[PROPERTY_temp].setShortDescription ( "Temperatura" );
            properties[PROPERTY_wilg] = new PropertyDescriptor ( "wilg", meteo.class, "getWilg", "setWilg" ); // NOI18N
            properties[PROPERTY_wilg].setDisplayName ( "Wilgotność" );
            properties[PROPERTY_wilg].setShortDescription ( "Wilgotność" );
        }
        catch(IntrospectionException e) {
            e.printStackTrace();
        }//GEN-HEADEREND:Properties

    // Here you can add code for customizing the properties array.

        return properties;     }//GEN-LAST:Properties

    // Event set information will be obtained from introspection.//GEN-FIRST:Events
    private static EventSetDescriptor[] eventSets = null;
    private static EventSetDescriptor[] getEdescriptor(){//GEN-HEADEREND:Events

    // Here you can add code for customizing the event sets array.

        return eventSets;     }//GEN-LAST:Events

    // Method information will be obtained from introspection.//GEN-FIRST:Methods
    private static MethodDescriptor[] methods = null;
    private static MethodDescriptor[] getMdescriptor(){//GEN-HEADEREND:Methods

    // Here you can add code for customizing the methods array.
    
        return methods;     }//GEN-LAST:Methods

    private static java.awt.Image iconColor16 = null;//GEN-BEGIN:IconsDef
    private static java.awt.Image iconColor32 = null;
    private static java.awt.Image iconMono16 = null;
    private static java.awt.Image iconMono32 = null;//GEN-END:IconsDef
    private static String iconNameC16 = null;//GEN-BEGIN:Icons
    private static String iconNameC32 = null;
    private static String iconNameM16 = null;
    private static String iconNameM32 = null;//GEN-END:Icons

    private static final int defaultPropertyIndex = -1;//GEN-BEGIN:Idx
    private static final int defaultEventIndex = -1;//GEN-END:Idx

    
//GEN-FIRST:Superclass

    // Here you can add code for customizing the Superclass BeanInfo.

//GEN-LAST:Superclass
	
    /**
     * Gets the bean's <code>BeanDescriptor</code>s.
     * 
     * @return BeanDescriptor describing the editable
     * properties of this bean.  May return null if the
     * information should be obtained by automatic analysis.
     */
    public BeanDescriptor getBeanDescriptor() {
	return getBdescriptor();
    }

    /**
     * Gets the bean's <code>PropertyDescriptor</code>s.
     * 
     * @return An array of PropertyDescriptors describing the editable
     * properties supported by this bean.  May return null if the
     * information should be obtained by automatic analysis.
     * <p>
     * If a property is indexed, then its entry in the result array will
     * belong to the IndexedPropertyDescriptor subclass of PropertyDescriptor.
     * A client of getPropertyDescriptors can use "instanceof" to check
     * if a given PropertyDescriptor is an IndexedPropertyDescriptor.
     */
    public PropertyDescriptor[] getPropertyDescriptors() {
	return getPdescriptor();
    }

    /**
     * Gets the bean's <code>EventSetDescriptor</code>s.
     * 
     * @return  An array of EventSetDescriptors describing the kinds of 
     * events fired by this bean.  May return null if the information
     * should be obtained by automatic analysis.
     */
    public EventSetDescriptor[] getEventSetDescriptors() {
	return getEdescriptor();
    }

    /**
     * Gets the bean's <code>MethodDescriptor</code>s.
     * 
     * @return  An array of MethodDescriptors describing the methods 
     * implemented by this bean.  May return null if the information
     * should be obtained by automatic analysis.
     */
    public MethodDescriptor[] getMethodDescriptors() {
	return getMdescriptor();
    }

    /**
     * A bean may have a "default" property that is the property that will
     * mostly commonly be initially chosen for update by human's who are 
     * customizing the bean.
     * @return  Index of default property in the PropertyDescriptor array
     * 		returned by getPropertyDescriptors.
     * <P>	Returns -1 if there is no default property.
     */
    public int getDefaultPropertyIndex() {
        return defaultPropertyIndex;
    }

    /**
     * A bean may have a "default" event that is the event that will
     * mostly commonly be used by human's when using the bean. 
     * @return Index of default event in the EventSetDescriptor array
     *		returned by getEventSetDescriptors.
     * <P>	Returns -1 if there is no default event.
     */
    public int getDefaultEventIndex() {
        return defaultEventIndex;
    }

 
}